import axios from "../model/axios";

export const popUpList = () => {
  return axios({
    method: "get",
    url: `/prod-api/api/public-welfare/public-welfare-type/list`,
    headers: {
      "Authorization": window.localStorage.getItem("token")
    }

  }
  )
}

//-------------------------------推荐
export const recommendList = () => {
  return axios({
    method: "get",
    url: `/prod-api/api/public-welfare/public-welfare-activity/recommend-list`,
    headers: {
      "Authorization": window.localStorage.getItem("token")
    }
  })
}


export const popItemList = (id: number) => {//某分类下的list
  return axios({
    method: "get",
    url: `/prod-api/api/public-welfare/public-welfare-activity/list?typeId=${id}&pa
geNum=1&pageSize=10`,
    headers: {
      "Authorization": window.localStorage.getItem("token")
    }
  })
}


export const ItemDonation = (id: number) => {//公益项目详情
  return axios({
    method: "get",
    url: `/prod-api/api/public-welfare/donate-record/list?activityId=${id}&pageNum=
1&pageSize=10`,
    headers: {
      "Authorization": window.localStorage.getItem("token")
    }
  })
}

